#!/usr/bin/perl

use lib::abs qw( .. ../../base_lib );
use JIP::ToolSet;

use Readonly qw( Readonly );
use English qw( -no_match_vars );
use Carp qw( croak );
use Test::More tests => 5;

Readonly my $OUTPUT_FILE => './output_file.test';

BEGIN { use_ok 'OutputWriter::Filter'; }
require_ok 'OutputWriter::Filter';

can_ok(
    'OutputWriter::Filter',
    qw(
        new
        init
        saveFileMetadata
        saveDirMetadata
        _write
        _outputFile
        _outputHandle
    )
);

{
    my $out = OutputWriter::Filter->new( output_file => $OUTPUT_FILE );

    isa_ok $out, 'OutputWriter';
    isa_ok $out, 'OutputWriter::Filter';

    unlink( $OUTPUT_FILE ) or croak 'cannot unlink '. $OS_ERROR;
}
